package com.sl.biz.modular.print.controller;

import com.sl.biz.modular.print.dao.domain.entity.PrintConfigDO;
import com.sl.biz.modular.print.service.PrintConfigBizService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/print/config")
@RequiredArgsConstructor
public class PrintConfigController {

    private final PrintConfigBizService printConfigBizService;

    @PostMapping("/save")
    public Boolean save(@RequestBody PrintConfigDO officeRecord) {
        return printConfigBizService.save(officeRecord);
    }


    @PostMapping("/list")
    public List<PrintConfigDO> list(@RequestBody PrintConfigDO jobConfigDO) {
        return printConfigBizService.list(jobConfigDO);
    }

    @PostMapping("/get_by_id")
    public PrintConfigDO getById(@RequestBody PrintConfigDO printConfigDO) {
        return printConfigBizService.getById(printConfigDO);
    }

    @PostMapping("/remove_by_id")
    public Boolean removeById(@RequestBody PrintConfigDO printConfigDO) {
        return printConfigBizService.removeById(printConfigDO);
    }


}
